package cn.edu.scau.cmi.zhuangzhihong.factory;

public class Factory {

	public  String Insurance(String type) {
		if (type.equalsIgnoreCase("BodyInjur")) {
			InsuranceClaims ic = new BodyInjur();
			String Lia = ic.GetLiability();
			return Lia;
		} else if (type.equalsIgnoreCase("AutomobileDamage")) {
			InsuranceClaims ic = new AutomobileDamage();
			String Lia = ic.GetLiability();
			return Lia;
		} else if (type.equalsIgnoreCase("Casualties")) {
			InsuranceClaims ic = new Casualties();
			String Lia = ic.GetLiability();
			return Lia;
		} else if (type.equalsIgnoreCase("MultipleAccidents")) {
			InsuranceClaims ic = new MultipleAccidents();
			String Lia = ic.GetLiability();
			return Lia;
		}
		String Lia = "Please chose";
		return Lia;
	}
}
